﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Revis.VClinicNet.App.Internal.Dto.Mappers;

using AutoMapper;
using NUnit.Framework;

namespace Revis.VClinicNet.App.Internal.Tests.Dto
{
    public class MappingTestBase
    {
        protected IEnumerable<IDtoMapper> Mappers { get; private set; }

        public MappingTestBase(IEnumerable<IDtoMapper> requiredMappers)
        {
            Mappers = requiredMappers;
        }

        [SetUp]
        public void SetUp()
        {
            Mapper.Reset();
            foreach (IDtoMapper mapper in Mappers) {
                mapper.Map();
            }
            Mapper.AssertConfigurationIsValid();
        }
    }
}
